home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple II Magazines (PO)
/
Bits and Bytes Volume 11, No. 05 (1989-11)(Apple Computing Enjoyment Society)(Side A).zip
/
Bits and Bytes Volume 11, No. 05 (1989-11)(Apple Computing Enjoyment Society)(Side A).po
/
ARTICLES
/
BEAGLE.COMPILER.txt
< prev
next >
Wrap
Text File
|
1996-12-24
|
6KB
|
111 lines
THE BEAGLE COMPILER
By Phil Shapiro, from E.A.C. EXPRESS
Applesoft BASIC is one of the most popular programming languages for
the Apple II family. It's easy to learn, flexible to use, and
compatible with every Apple II computer ever sold. Applesoft is built
into every Apple II computer since the antique Apple II+, so it's
immediately accessible to everyone. Even the "original" Apple II's,
from circa 1978, can run Applesoft BASIC programs (when installed with
an Applesoft BASIC LANGUAGE BOARD).
Although the acronym BASIC stands for "Beginner's All-Purpose Symbolic
Instructional Code," Applesoft BASIC is used by more than a few
professional programmers. And Applesoft is by far the most popular
programming language for amateur Apple II programmers. You need only
look at the mounds of public domain programs written in Applesoft to
appreciate the great flexibility of the language.
But Applesoft does have one important limitation: sometimes it can be
as slow as a snail with two broken legs. The reason for Applesoft
being slow is that it's an interpreted language. Each time you run an
Applesoft program, your Apple II has to translate each line of code
into instructions that are intelligible to the CPU.
In many programs, this translation process does not slow the program
down appreciably. After all, your Apple II can carry out hundreds of
instructions in one second. But in other programs the translation of
Applesoft lines into lower-level "machine language" code slows the
program down to an unacceptable crawl.
"What to do?" you sigh impatiently. Never fear, Beagle Bros to the
rescue. Beagle Bros is a company that built its reputation by selling
extraordinarily useful software tools to Apple II programmers. (These
days Beagle Bros has shifted their marketing emphasis to the sale of
AppleWorks enhancements.) Back in 1986, Beagle Bros released their
latest programming tool, the Beagle compiler.
The Beagle Compiler is a program that translates your Applesoft
program into low-level "machine code" before the program is run.
Then, when you run your "compiled" program, the program zips along
from anywhere between two to fifteen times faster than it did before.
All of a sudden, Applesoft BASIC is not only easy to learn and
flexible to use; these days good old Applesoft is fast and powerful
too.
To be honest, the Beagle Compiler is not a panacea for all Applesoft
woes. Some Applesoft programs are not speeded up much by being
compiled. Programs that make heavy use of the random function (RND)
or the trig functions (SIN, COS, and TAN) do not run at lightning
speed. And some Applesoft programs are just not useable when running
at a superfast speed.
But your average Applesoft program that seems a little weary and
fatigued in normal operation, will benefit splendidly by being
compiled. In the few seconds it takes for the Beagle Compiler to work
it's magic, your program will regain that youthful bounce in its step.
"So how do you go about using the Beagle Compiler?" you might ask.
Well, the best thing about this compiler is its ease of use. You
don't need a PhD in computer science to use it. Even beginning
programmers could learn how to use it.
Having just said the above, it behooves me to add that to get the most
out of this compiler, you really ought to have a solid familiarity
with Applesoft BASIC and the ProDos operating system. You can use the
compiler easily if you have simple programs to compile. But if your
programs are long and/or complicated, you'll have to study up a bit to
make use of the advanced features of the compiler.
The documentation that accompanies the Beagle Compiler is concise,
informative, and complete. Used in conjunction with the demonstration
programs on the disk itself, the documentation does an exemplary job
of explaining what you need to do to use the compiler. Basically, all
you need to do is: 1) Boot the Beagle Compiler disk, 2) Take the disk
out of your disk drive, 3) Put your own ProDos based Applesoft disk in
the drive, and 4) Type RUN followed by the name of the program you
want to run at compiled speed.
Your disk drive will then whirr, the compiler will take about five to
ten seconds to "do-its-thing," and very soon your program will be off
and running at machine language speed. Easy enough for a second
grader, come to think of it.
If you are a throroughly devoted speed demon, the Beagle Compiler also
allows you to compile your Applesoft programs to disk. The compiler
can actually translatge your program into pseudo machine-language
code, and then save that code to disk. To do this, just type the
command COMPILE, followedd by the name of the program you want
compiled, and the name you want the ensuing compiled program to be
saved as.
Once a program is compiled to disk, you can run it at the fast speed
without even waiting the usual five to ten seconds for the compiler to
translate your code. Pretty darn nifty, don't you think?
The Beagle Compiler opens up whole new programming possibilities for
creative Applesoft aficianados. Gone are the nagging speed limits of
old. Combined with the new Zip Chip speedy CPU's, and the fast CPU's
of the Apple IIGS and IIc+, Applesoft BASIC is sure to enjoy a
resurgence among amateurs and professionals alike.
The Beagle Compiler runs on all Apple II's from the II+ to the IIc+.
In the great Beagle Bros tradition, the disk is not copy-protected.
It sells for about $46, mail order. A big thanks is owed to Alan
Bird, the inspired creator of the Beagle Compiler program.